import 'package:flutter/material.dart';
import 'package:flutter_audit_app/res/colors.dart';
import 'package:flutter_audit_app/res/gaps.dart';
import 'package:flutter_audit_app/res/styles.dart';

class IconLabel extends StatelessWidget {
  final String _iconPath;
  final String _labelText;
  final String _markPath;

  ///Named option parameters can't start with an underscore.
  const IconLabel({
    @required String iconPath,
    String labelText,
    String rightIconMark,
  })  : _iconPath = iconPath,
        _markPath = rightIconMark,
        _labelText = labelText;

  @override
  Widget build(BuildContext context) {
    return Container(
      height: height(70),
      child: Stack(
        children: <Widget>[
          Align(
            alignment: Alignment.centerLeft,
            child: Row(
              children: <Widget>[
                Image.asset(_iconPath),
                SizedBox(width: 7),
                Text(
                  _labelText,
                  style: TextStyles.textSize12AndBlack,
                ),
              ],
            ),
          ),
          Align(
            alignment: Alignment.centerRight,
            child: Image.asset(_markPath),
          ),
          Align(
            child: Gaps.dividerH(),
            alignment: Alignment.bottomCenter,
          ),
        ],
      ),
    );
  }
}
